package com.mxl;


import lombok.extern.slf4j.Slf4j;

/**
* @description: 月份枚举
* @author mxl
* @date 2022-02-17 16:50
*/
@Slf4j
public class MonthEnumTest {


    public static void main(String[] args) {
        // 输出某一个枚举的值
        log.info(MonthEnum.JANUARY.getName());

        //遍历所有枚举信息
        for (MonthEnum monthEnum : MonthEnum.values()){
            log.info(monthEnum + " code: " + monthEnum.getCode() + " name: " + monthEnum.getName());
        }
    }
}
